Semantic Types and Approximation for Featherweight Java
نویسندگان
چکیده
We consider semantics for the class-based object-oriented calculus Featherweight Java (without casts) based uponapproximation. We also define an intersection type assignment system for this calculus and show that it satisfies subjectreduction and expansion, i.e. types are preserved under reduction and its converse. We establish a link between typeassignment and the approximation semantics by showing an approximation result, which leads to a sufficient conditionfor the characterisation of head-normalisation and termination.We show the expressivity of both our calculus and our type system by defining an encoding of Combinatory Logicinto our calculus and showing that this encoding preserves typeability. We also show that our system characterises thenormalising and strongly normalising terms for this encoding. We thus demonstrate that the great analytic capabilitiesof intersection types can be applied to the context of class-based object orientation.
منابع مشابه
Semantic types for class-based objects
We investigate semantics-based type assignment for class-based object-oriented programming. Our motivation is developing a theoretical basis for practical, expressive, type-based analysis of the functional behaviour of object-oriented programs. We focus our research using Featherweight Java, studying two notions of type assignment:one using intersection types, the other a ‘logical’ restriction ...
متن کاملConstructive Foundations for Featherweight Java
In this paper we present a recursion-theoretic denotational semantics for Featherweight Java. Our interpretation is based on a formalization of the object model of Castagna, Ghelli and Longo in a predicative theory of types and names. Although this theory is prooftheoretically weak, it allows to prove many properties of programs written in Featherweight Java. This underpins Feferman’s thesis th...
متن کاملLazyJ: Seamless Lazy Evaluation in Java
LazyJ is a backward-compatible extension of the Java programming language that allows programmers to seamlessly tap into the power and expressiveness of lazy evaluation. It does so by extending Java’s type system with lazy types. A variable of type lazy T (where T is any Java type) can hold a thunk which when evaluated will yield a value of type T. The existence of coercions between non-lazy an...
متن کاملA Featherweight Calculus for Flow-Sensitive Type Systems in Java
Featherweight Java has been highly successful for reasoning about type systems in Java. However, it is not suited to formalising flow-sensitive type systems. Such systems differ from the norm by allowing variables to have different types at different program points. A large number of problems are naturally expressed in this way. For example, reasoning about non-null types requires retyping a va...
متن کاملFunctional Type Assignment for Featherweight Java
We consider functional type assignment for the class-based object-oriented calculus Featherweight Java. We start with an intersection type assignment systems for this calculus for which types are preserved under conversion. We then define a variant for which type assignment is decidable, and define a notion of unification as well as a principal typeing algorithm. We show the expressivity of bot...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Theor. Comput. Sci.
دوره 517 شماره
صفحات -
تاریخ انتشار 2014